package org.jeecg.modules.grand.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.grand.entity.GrandBar;
import org.jeecg.modules.grand.mapper.GrandBarMapper;
import org.jeecg.modules.grand.service.IGrandBarService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description: grand_bar
 * @Author: jeecg-boot
 * @Date:   2021-05-20
 * @Version: V1.0
 */
@Service
public class GrandBarServiceImpl extends ServiceImpl<GrandBarMapper, GrandBar> implements IGrandBarService {

    @Override
    public List<String> getBarList() {

        LambdaQueryWrapper<GrandBar> queryWrapper=new LambdaQueryWrapper<>();
        List<String> result=new ArrayList<>();
        List<GrandBar> grandBars=this.baseMapper.selectList(queryWrapper);
        for(GrandBar grandBar:grandBars){
            result.add(grandBar.getName());
        }
        return result;
    }
}
